<?php /*a:3:{s:57:"/www/wwwroot/xiaoyuan/php/app/admin/view/medal/index.html";i:1745172487;s:50:"/www/wwwroot/xiaoyuan/php/app/admin/view/main.html";i:1745172487;s:56:"/www/wwwroot/xiaoyuan/php/app/admin/view/breadcrumb.html";i:1745172487;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title><?php echo xn_cfg('base.sys_name'); ?></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <script>
        //全局上传文件端口
        var UPLOAD_FILE_URL = "<?php echo url('upload_files/upload'); ?>";
        //全局选择文件端口
        var SELECT_FILE_URL = "<?php echo url('upload_files/select'); ?>";
    </script>
    <script src="/static/admin/js/jquery-2.0.0.min.js"></script>
    <script src="/static/admin/js/common.js"></script>
    <script src="/static/admin/js/upload.js"></script>
    <script src="/static/admin/js/webuploader.min.js"></script>
    <link rel="stylesheet" href="/static/admin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/admin/style/layuiAdmin.css" media="all">
    <link rel="stylesheet" href="/static/admin/style/base.css" media="all">
    
</head>
<body>

<?php if(!empty($breadcrumb)): ?>
<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
    	<?php if(input('bcid') == '000'): ?>
        <a href="<?php echo url('admin/index/home'); ?>">主页</a>
        <a href="<?php echo url('admin/apply/index'); ?>">应用</a>
        <a><cite><?php echo input('title'); ?></cite></a>
        <?php endif; if(input('bcid') != '000'): ?>
        <a href="<?php echo url('admin/index/home'); ?>">主页</a>
        <?php if(is_array($breadcrumb) || $breadcrumb instanceof \think\Collection || $breadcrumb instanceof \think\Paginator): if( count($breadcrumb)==0 ) : echo "" ;else: foreach($breadcrumb as $key=>$vo): ?>
        <a><cite><?php echo htmlentities($vo['title']); ?></cite></a>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        <?php endif; ?>
    </div>
</div>
<?php endif; ?>
<div class="layui-fluid">
    <table class="layui-table" style="margin-top: 0;">
        <tr>
            <th><b>勋章名称</b></th>
            <th><b>勋章图片</b></th>
            <th><b>获取条件</b></th>
            <th><b>条件数量</b></th>
            <th><b>领取数量</b></th>
            <th style="padding: 0 15px;line-height: 40px;"><b>操作</b> <span style="float: right"><a href="<?php echo url('add'); ?>" data-width="600px" data-height="650px" class="layui-btn layui-btn-sm xn_open" title="添加勋章">添加勋章</a></span> </th>
        </tr>

        <tbody>
        <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): if( count($list)==0 ) : echo "" ;else: foreach($list as $key=>$vo): ?>
        <tr>
            <td><?php echo htmlentities($vo['title']); ?></td>
            <td><a href="javascript:;" onClick="showImg(this)" data-href="<?php echo htmlentities($vo['image']); ?>" ><img src="<?php echo htmlentities($vo['image']); ?>" width="50"></a></td>
            <td>
                <a class="layui-btn layui-btn-sm show_type"><?php echo htmlentities($vo['type']); ?></a>
            </td>
            <td class="layui-form">
                <?php echo htmlentities($vo['meet_num']); ?>
            </td>
            <td>
                <?php echo htmlentities($vo['has_num']); ?>
            </td>
            <td>
                <a href="<?php echo url('edit',array('id'=>$vo['id'])); ?>" data-width="600px" data-height="650px" title="修改标签" class="layui-btn layui-btn-normal layui-btn-xs xn_open">
                    <i class="layui-icon layui-icon-edit"></i>修改
                </a>
                <a href="<?php echo url('showFollow',array('id'=>$vo['id'])); ?>" data-width="1000px" data-height="650px" title="查看拥有" class="layui-btn layui-btn-normal layui-btn-xs xn_open">
                    查看拥有
                </a>
                <?php if($vo['id'] != 1): ?>
                <a href="<?php echo Url('delete',array('id'=>$vo['id'])); ?>" title="确认要删除【<?php echo htmlentities($vo['title']); ?>】吗？" class="layui-btn layui-btn-danger layui-btn-xs xn_delete">
                    <i class="layui-icon layui-icon-delete"></i>删除
                </a>
                <?php endif; ?>
            </td>
        </tr>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>
    <div style="margin:0 auto;text-align: center;display: none;" id="showType0">
        <img class="show_images" src="/static/admin/images/bigimage.png">
    </div>
    <div style="margin:0 auto;text-align: center;display: none;" id="showType1">
        <img class="show_images" src="/static/admin/images/shupai.png">
    </div>
    <div style="margin:0 auto;text-align: center;display: none;" id="showType2">
        <img class="show_images" src="/static/admin/images/hengpai.png">
    </div>
</div>


<script src="/static/admin/layui/layui.all.js"></script>
<script src="/static/admin/js/admin.js"></script>

<script>
    layui.form.on('switch(status)', function(data){
        //layer.tips('开关checked：'+ (this.checked ? 'true' : 'false'), data.othis)
        var val = this.checked ? 1 : 0;
        var id = $(this).attr('data-id');
        var url = "<?php echo url('edit'); ?>";
        $.post(url,{id:id,status:val},function (res) {
            console.log(res);
            layer.tips(res.msg, data.othis);
        },'json')
    });
    // $('.show_type').hover(
    //     function(){
    //         var id = $(this).attr('data-id');
    //         $('#showType'+id).show();
    //     },function(){
    //         $('#showType'+id).hide();
    //     }
    // );
</script>

</body>
</html>